package studia.figlewicz.dao.ejb;

// Generated 2011-06-03 08:31:30 by Hibernate Tools 3.4.0.CR1

import java.math.BigDecimal;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.JoinColumns;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * Wycenainstrumentu generated by hbm2java
 */
@Entity
@Table(name = "WYCENAINSTRUMENTU", schema = "MARCIN")
public class Wycenainstrumentu implements java.io.Serializable {

	private WycenainstrumentuId id;
	private Wycenaportfela wycenaportfela;
	private Instrumentpochodny instrumentpochodny;
	private Planwyceny planwyceny;
	private BigDecimal cenarealna;
	private BigDecimal delta;
	private BigDecimal gamma;
	private BigDecimal rho;
	private BigDecimal vega;
	private Set<Wycenanogi> wycenanogis = new HashSet<Wycenanogi>(0);

	public Wycenainstrumentu() {
	}

	public Wycenainstrumentu(WycenainstrumentuId id,
			Wycenaportfela wycenaportfela, Instrumentpochodny instrumentpochodny) {
		this.id = id;
		this.wycenaportfela = wycenaportfela;
		this.instrumentpochodny = instrumentpochodny;
	}

	public Wycenainstrumentu(WycenainstrumentuId id,
			Wycenaportfela wycenaportfela,
			Instrumentpochodny instrumentpochodny, Planwyceny planwyceny,
			BigDecimal cenarealna, BigDecimal delta, BigDecimal gamma,
			BigDecimal rho, BigDecimal vega, Set<Wycenanogi> wycenanogis) {
		this.id = id;
		this.wycenaportfela = wycenaportfela;
		this.instrumentpochodny = instrumentpochodny;
		this.planwyceny = planwyceny;
		this.cenarealna = cenarealna;
		this.delta = delta;
		this.gamma = gamma;
		this.rho = rho;
		this.vega = vega;
		this.wycenanogis = wycenanogis;
	}

	@EmbeddedId
	@AttributeOverrides({
			@AttributeOverride(name = "nazwaportfela", column = @Column(name = "NAZWAPORTFELA", nullable = false, length = 50)),
			@AttributeOverride(name = "datawyceny", column = @Column(name = "DATAWYCENY", nullable = false, length = 7)),
			@AttributeOverride(name = "kodumowyinstrumentu", column = @Column(name = "KODUMOWYINSTRUMENTU", nullable = false, length = 20)) })
	public WycenainstrumentuId getId() {
		return this.id;
	}

	public void setId(WycenainstrumentuId id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumns({
			@JoinColumn(name = "NAZWAPORTFELA", referencedColumnName = "NAZWAPORTFELA", nullable = false, insertable = false, updatable = false),
			@JoinColumn(name = "DATAWYCENY", referencedColumnName = "DATAWYCENY", nullable = false, insertable = false, updatable = false) })
	public Wycenaportfela getWycenaportfela() {
		return this.wycenaportfela;
	}

	public void setWycenaportfela(Wycenaportfela wycenaportfela) {
		this.wycenaportfela = wycenaportfela;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "KODUMOWYINSTRUMENTU", nullable = false, insertable = false, updatable = false)
	public Instrumentpochodny getInstrumentpochodny() {
		return this.instrumentpochodny;
	}

	public void setInstrumentpochodny(Instrumentpochodny instrumentpochodny) {
		this.instrumentpochodny = instrumentpochodny;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumns({
			@JoinColumn(name = "NAZWAPLANUWYCENY", referencedColumnName = "NAZWA"),
			@JoinColumn(name = "NUMERWERSJIPLANUWYCENY", referencedColumnName = "NUMERWERSJI") })
	public Planwyceny getPlanwyceny() {
		return this.planwyceny;
	}

	public void setPlanwyceny(Planwyceny planwyceny) {
		this.planwyceny = planwyceny;
	}

	@Column(name = "CENAREALNA", precision = 24, scale = 12)
	public BigDecimal getCenarealna() {
		return this.cenarealna;
	}

	public void setCenarealna(BigDecimal cenarealna) {
		this.cenarealna = cenarealna;
	}

	@Column(name = "DELTA", precision = 24, scale = 12)
	public BigDecimal getDelta() {
		return this.delta;
	}

	public void setDelta(BigDecimal delta) {
		this.delta = delta;
	}

	@Column(name = "GAMMA", precision = 24, scale = 12)
	public BigDecimal getGamma() {
		return this.gamma;
	}

	public void setGamma(BigDecimal gamma) {
		this.gamma = gamma;
	}

	@Column(name = "RHO", precision = 24, scale = 12)
	public BigDecimal getRho() {
		return this.rho;
	}

	public void setRho(BigDecimal rho) {
		this.rho = rho;
	}

	@Column(name = "VEGA", precision = 24, scale = 12)
	public BigDecimal getVega() {
		return this.vega;
	}

	public void setVega(BigDecimal vega) {
		this.vega = vega;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "wycenainstrumentu")
	public Set<Wycenanogi> getWycenanogis() {
		return this.wycenanogis;
	}

	public void setWycenanogis(Set<Wycenanogi> wycenanogis) {
		this.wycenanogis = wycenanogis;
	}

}
